package com.ggkt.collection;

import java.util.LinkedList;

/**
 * @author ggkt
 * LinkedList删除添加快，查询慢；
 */
public class LinkedListDemo {
    public static void main(String[] args) {
        LinkedList ll = new LinkedList();
        ll.add("Auto");
        ll.add("Base");
        ll.add("Cool");
        ll.add("Desk");
        for(Object obj:ll){
            System.out.println(obj);
        }
        System.out.println("ll size is: "+ll.size());
        ll.remove("Cool");
        System.out.println("after remove ll size is: "+ll.size());
        for(Object obj:ll){
            System.out.println(obj);
        }
    }
}
